<%@ page language="java"  pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
    <style type="text/css">
    form {
    margin: 0;
    }
    .editor {
    margin-top: 5px;
    margin-bottom: 5px;
    }
  </style>
  <script type="text/javascript" charset="utf-8" src="./jsp/common/kindeditor.js"></script>
  <script type="text/javascript">
    KE.show({
        id : 'content2',
		resizeMode : 0,
        cssPath : './index.css',
		allowUpload : true,
    	imageUploadJson : '/saveImg',  
		
        items : [
        'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
        'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
        'insertunorderedlist', 'emoticons', 'link']
    });
  </script>
  </head>
  
  <body>
     <form name="example" method="post" action="./../php/demo.php">
  	<div class="editor">
    <textarea id="content2" name="content" style="width:700px;height:200px;visibility:hidden;"></textarea>
  	</div>
	<input type="button" name="button" value="取得内容" onclick="javascript:alert(KE.util.getData('content2'));" />
    <input type="button" name="button" value="取得纯文本" onclick="javascript:alert(KE.util.getPureData('content2'));" />
    
	</form>
  </body>
</html>
